function login(){
    var phone = $("#phone").val();
    var password_original = $("#password").val();
    var password=hex_md5(password_original)
    if(!phone){
        tip("请输入您的用户名(手机)", 2000, 'warning');
        return;
    }
    if(!password){
        tip("请输入您的密码", 2000, 'warning');
        return;
    }
    $("#login").text("登陆中...");
    $.ajax({
        url:'/xiaomifeng/user/login',
        type:'post',
        contentType:"application/json; charset=utf-8",
        data: JSON.stringify({
            mobile:phone,
            password:password
        }),

        async : true, //默认为true 异步
        dataType: 'json',
        success:function(data){
            $("#login").text("登   录");
            if(data.errCode == '0000000'){
                tip('登录成功！', 2000, 'success');  //设置显示时间
                localStorage.setItem("jwt", data.data.jwt);
                //alert('登录成功')
                 setTimeout("this.location.href= 'passwordquery.html'",1000);
            }else{
                tip(data.errorMessage, 2000, 'warning');  //设置显示时间
            }

        }
    });
}